<template>
  <div class="">
    <van-nav-bar title="砍价列表" left-arrow @click-left="$router.go(-1)" />
    <CommodityCard
      @click="$router.push('/barginList?id=' + v.id)"
      v-for="(v, i) in obj"
      :key="i"
      :cardList="v"
    ></CommodityCard>
  </div>
</template>

<script>
import CommodityCard from "../CommodityCard.vue";
import { moodsList } from "@/api"; // 人气列表的接口
import { ref } from "vue";
export default {
  setup() {
    let obj = ref([]);
    moodsList().then((res) => {
      obj.value = res.slice(9, 13);
      console.log(obj.value);
    });
    return {
      obj,
    };
  },
  components: { CommodityCard },
};
</script>

<style lang="scss" scoped></style>
